/*************************************************************************
	> File Name: test.c
	> Author: H.M. Lau
	> Mail: hm.lau@outlook.com
	> Created Time: 2023/08/26 20:50
 ************************************************************************/

#include <stdio.h>

#define SIZE 64

int main(int argc, char *argv[]) {
    if (argc != 2) {
        printf("argc error\n");
        return 1;
    } 
    FILE *fp = fopen(argv[1], "r");
    if (fp == NULL) {
        perror("fopen");
        return 2;
    }
    char line[SIZE];
    while (fgets(line, sizeof line, fp) != NULL) fprintf(stdout, "%s", line);
    fclose(fp);
    return 0;
}
